
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 0793
 * @Author : WangRuoyu 
 * @Date : 2023/9/13 16:41
 */

#include "iostream"
#include "vector"

using namespace std;

vector<int> mul(vector<int> &a, int b) {
    vector<int> c;

    int t = 0;

    for (int i = 0; i < a.size(); ++i) {
        t += a[i] * b;
        c.push_back(t % 10);
        t /= 10;
    }

    while (t) {
        c.push_back(t % 10);
        t /= 10;
    }

    while (c.size() > 1 && c.back() == 0) c.pop_back();

    return c;
}

int main() {
    string sa;
    vector<int> a;
    int b;

    cin >> sa >> b;

    for (int i = sa.size() - 1; i >= 0; --i) {
        a.push_back(sa[i] - '0');
    }

    vector<int> c;
    c = mul(a, b);

    for (int i = c.size() - 1; i >= 0; --i) {
        printf("%d", c[i]);
    }

    return 0;
}